package org.rcloud.io.Utils;

import java.io.Serializable;

public class ResultVo implements Serializable {
    private int code;
    private String msg;
    private Object info;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getInfo() {
        return info;
    }

    public void setInfo(Object info) {
        this.info = info;
    }


    public static ResultVo setOK(Object object){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(0);
        resultVo.setMsg("OK");
        resultVo.setInfo(object);
        return resultVo;
    }

    public static ResultVo setError(Object object){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(1);
        resultVo.setMsg("error");
        resultVo.setInfo(object);
        return resultVo;
    }

}
